home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Apple Shared Library Manager / ASLM Examples / Inspector / Sources / RegisteredObjectsWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-19  |  2.1 KB  |  82 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        RegisteredObjectsWindow.h
  3.  
  4.     Contains:    TRegisteredObjectsWindow interface.  A window that displays a list
  5.                 of TRegisteredObjects.
  6.  
  7.     Copyright:    © 1991-1994 by Apple Computer, Inc., all rights reserved.
  8.  
  9. */
  10.  
  11.  
  12. #ifndef __REGISTEREDOBJECTSWINDOW__
  13. #define __REGISTEREDOBJECTSWINDOW__
  14.  
  15. #ifndef __DOCUMENT__
  16. #include "Document.h"
  17. #endif
  18.  
  19. class TInspector;
  20.  
  21. const short kWindowHStart = 5;
  22. const short kWindowVStart = 43;
  23. const short kWindowHSizeStart = 400;
  24. const short kWindowVSizeStart = 250;
  25. const short kWindowHResetStagger = 20;
  26. const short kWindowHStagger = 16;
  27. const short kWindowVStagger = 16;
  28.  
  29. class TList;
  30. class TRegisteredObjectsWindow;
  31. class TRegisteredObjects;
  32. struct EventRecord;
  33.  
  34. const int kButtonSpace = 0;    // space in window for the buttons on left side.
  35.                             // keep this at 0 until we add buttons
  36.  
  37.  
  38. /**********************************************************************
  39. ** class TRegisteredObjectsWindow
  40. ***********************************************************************/
  41.  
  42. #define kTRegisteredObjectsWindowID "appl:insp$TRegisteredObjectsWindow,1.2"
  43.  
  44. class TRegisteredObjectsWindow : public TDocument
  45. {
  46. public:
  47.                         TRegisteredObjectsWindow();
  48.                         TRegisteredObjectsWindow(short resID, TRegisteredObjects*,
  49.                                                 TInspector*);
  50.     virtual                ~_CDECL TRegisteredObjectsWindow();
  51.     
  52.     virtual void        DoGrow(EventRecord* theEvent);
  53.     virtual    void        DoContent(EventRecord* theEvent);
  54.     virtual    void        DoActivate(Boolean becomingActive);
  55.     virtual    void        DoUpdate();
  56.  
  57.     // New Methods
  58.  
  59.     virtual    void        DrawWindow();
  60.     virtual    void        UpdateList();
  61.     virtual    Rect        GetListRect();
  62.     virtual    void        DrawGrowIcon();
  63.     virtual    void        MoveWindow(short hGlobal, short vGlobal);
  64.     virtual    void        SizeWindow(short w, short h);
  65.     virtual    void        HomeWindow();
  66.     virtual    void        GetWindowSize(short &w, short &h);
  67.     virtual    void        GetWindowLocation(short &hGlobal, short &vGlobal);
  68.     virtual    void        SaveWindowLocation();
  69.     virtual    Boolean        RestoreWindowLocation();
  70.  
  71. private:
  72.             void        InitRegisteredObjectsWindow(TRegisteredObjects*,
  73.                                                     TInspector*);
  74.  
  75. private:
  76.         TList*                fList;            // the List Manager list
  77.         TRegisteredObjects*    fRegisteredObjects;
  78.         TInspector*            fInspector;
  79. };
  80.  
  81. #endif
  82.